projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9eed48c
)
common: bootm: check return value of strict_strtoul
author
Peng Fan
<
[email protected]
>
Tue, 24 Nov 2015 08:54:20 +0000
(16:54 +0800)
committer
Tom Rini
<
[email protected]
>
Sat, 5 Dec 2015 23:22:12 +0000
(18:22 -0500)
Before continue, check return value of strict_strtoul.
Signed-off-by: Peng Fan <
[email protected]
>
Cc: Albert Aribaud <
[email protected]
>
Cc: Simon Glass <
[email protected]
>
Cc: Jan Kiszka <
[email protected]
>
Cc: Joe Hershberger <
[email protected]
>
Cc: Hans de Goede <
[email protected]
>
Cc: York Sun <
[email protected]
>
Cc: Tom Rini <
[email protected]
>
Reviewed-by: Simon Glass <
[email protected]
>
arch/arm/lib/bootm.c
patch
|
blob
|
history
diff --git
a/arch/arm/lib/bootm.c
b/arch/arm/lib/bootm.c
index ee56d7403e93379b056bb8379c8153d48a79c187..a477cae010db9da5d2f6a04f706e9b16342feaba 100644
(file)
--- a/
arch/arm/lib/bootm.c
+++ b/
arch/arm/lib/bootm.c
@@
-290,7
+290,10
@@
static void boot_jump_linux(bootm_headers_t *images, int flag)
s = getenv("machid");
if (s) {
- strict_strtoul(s, 16, &machid);
+ if (strict_strtoul(s, 16, &machid) < 0) {
+ debug("strict_strtoul failed!\n");
+ return;
+ }
printf("Using machid 0x%lx from environment\n", machid);
}